package com.gph.saviorframework.generator.service.impl;

import com.gph.saviorframework.common.model.Sequences;
import com.gph.saviorframework.dao.sequences.SequencesDao;
import com.gph.saviorframework.generator.service.SequencesService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;
import java.util.Set;

public class SequencesServiceImpl implements SequencesService {

    @Autowired
    private SequencesDao sequencesDao;

    /**
     * 保存
     *
     * @param sequences
     */
    @Override
    public void save(Sequences sequences) {
        sequencesDao.save(sequences);
    }

    /**
     * 根据编号获取
     *
     * @param id
     * @return
     */
    @Override
    public Sequences get(String id) {
        return sequencesDao.get(id);
    }

    /**
     * 更新
     *
     * @param sequences
     * @return
     */
    @Override
    public void update(Sequences sequences) {
        sequencesDao.update(sequences);
    }

    /**
     * 批量更新
     *
     * @param sequences
     */
    @Override
    public void update(Set<Sequences> sequences) {

    }

    /**
     * 根据条件返回数据
     *
     * @param sort
     * @param dir
     * @param params
     * @return
     */
    @Override
    public List<Map<String, Object>> find(String sort, String dir, Map<String, Object> params) {
        return null;
    }

    /**
     * 带分页参数的，给bootstrap使用的
     *
     * @param start  开始页码，从1开始
     * @param limit  每页查询的次数
     * @param sort
     * @param dir
     * @param params
     * @return
     */
    @Override
    public Map<String, Object> find(int start, int limit, String sort, String dir, Map<String, Object> params,Object... extras) {
        return null;
    }

    /**
     * 统计数量
     *
     * @param params
     * @return
     */
    @Override
    public long count(Map<String, Object> params) {
        return 0;
    }

    /**
     * 根据主键删除
     *
     * @param id
     */
    @Override
    public void delete(String id) {

    }

    /**
     * 批量删除
     *
     * @param ids
     */
    @Override
    public void deleteByIds(String[] ids) {

    }

    /**
     * 查询字段集合
     *
     * @return
     */
    @Override
    public Map<String, String> getFields() {
        return null;
    }

    /**
     * 根据id查询map
     *
     * @param id
     * @return
     */
    @Override
    public Map<String, Object> findById(String id) {
        return null;
    }

    /**
     * 生成where条件
     *
     * @param params
     * @param extra
     * @return
     */
    @Override
    public String genWhereClause(Map<String, Object> params, Object... extra) {
        return null;
    }
}
